<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="../common/common.jsp" %>
<%@ include file="user_pass2.jsp" %>
<%
int pageIndex = ParamUtils.getIntParameter(request, "pageIndex", 1);
int pageSize = 10;
int type = Utility.parseInt(request.getParameter("type"));	//0.我发起的帖子，1.我的回复

ITopicService topicService = (ITopicService)BeanManager.getBean("topicService");
int totalrows = topicService.listCountMyTopic(userLogin.getUserId().intValue(),type);

String pageUrl = "user_topic.jsp?type="+type+"&";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=SYSTITLE%> - 我的话题</title>
<meta name="Keywords" content="<%=SYSMETAKEY%>" />
<meta name="Description" content="<%=SYSMETADESC%>" />
<%@ include file="../common/meta.inc" %>
<link rel="stylesheet" type="text/css" href="css/defaultStyle.css" >
<script language="javascript" type="text/javascript" src="scripts/showMenu.js"></script>
</head>
<body>
<%@ include file="../common/waiting.inc" %>
<SCRIPT language="javascript">

setStatus('<%=SYSTITLE%> - 我的话题');
</SCRIPT>
<script language="javascript" type="text/javascript" src="template/scripts/topBar.js"></script>
<%@ include file="includes/userMenu.inc" %>
<DIV class="line"></DIV>
<DIV class="list_table_0">
<%=HtmlConst.navMenu("user_take.jsp","我的工具箱")%>&gt;&gt;我的话题
&nbsp;&nbsp;[<a href="user_topic.jsp?type=0">我发起的话题</a>]&nbsp;&nbsp;[<a href="user_topic.jsp?type=1">我参与的话题</a>]
</DIV>
<DIV class="line"></DIV>
<DIV class="list_tab_0">
	<DIV class="list_left_1"><span class="text_bold">版面</span></DIV>
	<DIV class="list_r_2">
		<DIV class="vertical"></DIV>
		<DIV class="list_none"><span class="text_bold">发表时间</span></DIV>		
	</DIV>
	<DIV class="list_center"><span class="text_bold">主题</span></DIV>
</DIV>
<%if(totalrows<=0){%>
	<DIV class="list_tab_1"><center>没有相关文章......</center></DIV>
<%}else
{	
List topicList = topicService.listMyTopic(userLogin.getUserId().intValue(),type,pageIndex,pageSize);	
Map topicMap = null;
for(int i=0;i<topicList.size();i++) {
	topicMap = (Map)topicList.get(i);
%>
<%if(type==0) { //主题%>
<DIV class="list_tab_1">
	<DIV class="list_left_1">	
	<%=Arguments.getClassLink(ParamUtils.getMapToInt(topicMap,"CLASS_ID"),ParamUtils.getMapToString(topicMap,"CLASS_NAME"))%>
	</DIV>
	<DIV class="list_r_2">
		<DIV class="vertical"></DIV>
		<DIV class="list_none"><%=HtmlConst.formatDateHtml(ParamUtils.getMapToDateTime(topicMap,"TOPIC_ADD_TIME")) %></DIV>
	</DIV>
	<DIV class="list_img_right">	
			<%=Arguments.getTopicHotDisplay(SYSINFO.getIsHottopic().intValue(),SYSINFO.getIsHotre().intValue(),ParamUtils.getMapToInt(topicMap,"TOPIC_VIEW_COUNT"),ParamUtils.getMapToInt(topicMap,"TOPIC_RE_COUNT")) %>
			<%=Arguments.getTopicTypeDisplay(ParamUtils.getMapToInt(topicMap,"TOPIC_TYPE"),ParamUtils.getMapToBigDecimal(topicMap,"TOPIC_TYPE_NUM"))%>			
	</DIV>
	<DIV class="list_topic">
	<%=Arguments.getTopicMoodDisplay(ParamUtils.getMapToInt(topicMap,"TOPIC_MOOD")) %>
	<%=Arguments.getTopicLink(ParamUtils.getMapToInt(topicMap,"CLASS_ID"),ParamUtils.getMapToInt(topicMap,"TOPIC_ID"),ParamUtils.getMapToInt(topicMap,"TOPIC_PRO"),ParamUtils.getMapToString(topicMap,"TITLE"),ParamUtils.getMapToString(topicMap,"TOPIC_STYLE_LIST"),ParamUtils.getMapToBoolean(topicMap,"TOPIC_IS_DEL"),100,1) %>
	</DIV>			
</DIV>
<%}
else { //回复%>
<DIV class="list_tab_1">
	<DIV class="list_left_1">	
	<%=Arguments.getClassLink(ParamUtils.getMapToInt(topicMap,"CLASS_ID"),ParamUtils.getMapToString(topicMap,"CLASS_NAME"))%>
	</DIV>
	<DIV class="list_r_2">
		<DIV class="vertical"></DIV>
		<DIV class="list_none"><%=HtmlConst.formatDateHtml(ParamUtils.getMapToDateTime(topicMap,"RE_ADD_TIME")) %></DIV>
	</DIV>
	<DIV class="list_topic">
	<%=Arguments.getTopicMoodDisplay(ParamUtils.getMapToInt(topicMap,"RE_MOOD")) %>
	<%=Arguments.getTopicReLink(ParamUtils.getMapToInt(topicMap,"CLASS_ID"),ParamUtils.getMapToInt(topicMap,"TOPIC_ID"),ParamUtils.getMapToInt(topicMap,"TOPIC_RE_ID"),ParamUtils.getMapToInt(topicMap,"RE_PRO"),ParamUtils.getMapToString(topicMap,"TITLE"),ParamUtils.getMapToString(topicMap,"RE_STYLE_LIST"),ParamUtils.getMapToBoolean(topicMap,"RE_IS_DEL"),100,1) %>
	</DIV>			
</DIV>
<%}} }%>
<DIV class="line"></DIV>
<DIV>
	<%=HtmlConst.pageJump(totalrows,pageSize, pageIndex, pageUrl)%>
</DIV>
<%=COPYRIGHTFOOT%>
<%@ include file="../common/foot.inc"%>
</body>
</html>